<template>
  <div>
    <h3>Son组件---{{num}}</h3>
    <button class="btn btn-danger" @click="add">+1</button>
  </div>
</template>

<script>
export default {
  name:'Son',
  props:['num'],
  emits:['update:num'],
  methods:{
    add(){
      // this.$emit('numChange',this.num+1);
      this.$emit('update:num', this.num+1);
    }
  },
}
</script>

<style lang="less" scoped>

</style>